//
//  Meaning.m
//  HotWord
//
//  Created by Rainbow on 1/15/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "Meaning.h"

@implementation Meaning

@synthesize chineseTranslate, englishTranslate, synonyms, antonyms, sentences;

-(id)init
{
    self = [super init];
    if (self) {
        antonyms = [[NSMutableArray alloc] init];
        synonyms = [[NSMutableArray alloc] init];
        sentences = [[NSMutableArray alloc] init];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
	[aCoder encodeObject:self.chineseTranslate forKey:@"chineseTranslate"];
	[aCoder encodeObject:self.englishTranslate forKey:@"englishTranslate"];
	[aCoder encodeObject:self.synonyms forKey:@"synonyms"];
	[aCoder encodeObject:self.antonyms forKey:@"antonyms"];
	[aCoder encodeObject:self.sentences forKey:@"sentences"];
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
	if ([self init]) {
		self.chineseTranslate= [aDecoder decodeObjectForKey:@"chineseTranslate"];
		self.englishTranslate = [aDecoder decodeObjectForKey:@"englishTranslate"];
		self.synonyms = [aDecoder decodeObjectForKey:@"synonyms"];
		self.antonyms= [aDecoder decodeObjectForKey:@"antonyms"];
		self.sentences = [aDecoder decodeObjectForKey:@"sentences"];
    }
	return self;
}

-(void)dealloc
{
    [chineseTranslate release];
    [englishTranslate release];
    [synonyms release];
    [antonyms release];
    [sentences release];
    [super dealloc];
}

@end
